package com.tsingtao.springboot2.api.controller;

import com.tsingtao.springboot2.dto.Department;
import com.tsingtao.springboot2.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/department")
public class DepartmentController {

    @Autowired
    private DepartmentService departmentService;

    @GetMapping("/select-department-list-with-employee")
    public List<Department> selectDepartmentListWithEmployee() {
        return departmentService.selectDepartmentListWithEmployee();
    }

}
